package actor

import (
	"database/sql"
	"fmt"
	"simple_game/app/utils"
)

type Table interface {
	TableName() string
	GetContent() string
}

func NewPlayerCheck(uuid int64, table Table) (*sql.Rows, bool) {
	tableName := table.TableName()
	sql := fmt.Sprintf("select * from %s where uuid =%d", tableName, uuid)
	rows, err := utils.DB.Query(sql)
	return rows, err == nil
}
